package tgc.edu.yzy.service;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.yzy.custom.CommonService;
import tgc.edu.yzy.entity.Admin;
import tgc.edu.yzy.repository.AdminRepository;
@Service
public class AdminService extends CommonService<Admin, Integer>{
	@Autowired
	private AdminRepository admindao;

	public Admin findByUsernameAndPassword(String username, String password) {
		return admindao.findByUsernameAndPassword(username,password);
	}
	@Transactional
	public void updatepassword(String password, Integer id) {
		admindao.updatePassword(password,id);
	}
}
